package com.example.tech34Base64;

import com.example.tech34Base64.utils.common.JSONRequest;
import com.example.tech34Base64.utils.common.JSONResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
public class ReceiveController {

    private static Logger LOGGER = LoggerFactory.getLogger(ReceiveController.class);

    @Autowired
    private ReceiveService receiveService;

    @RequestMapping("receive")
    public String get(HttpServletRequest request, HttpServletResponse respons) {
        System.out.println("获取文件：开始");
        String msg = request.getParameter("msg");
        System.out.println("参数："+msg);
        receiveService.receive();
        System.out.println("获取文件：结束");
        return "数据采集";
    }
}
